# tasks/urls.py
from django.urls import path, re_path
from . import views

# namespace
app_name = 'bookstore'

urlpatterns = [
    # 书籍信息
    path('books-list', views.BooksListAPIView.as_view(), name='books-list'),
    path('books/<int:pk>', views.BooksAPIView.as_view(), name='books'),
    path("books/create", views.add_book, name="book_create"),
    # 借书信息
    path('borrower-list', views.BorrowListAPIView.as_view(), name='borrower-list'),
    path('borrower/<int:pk>', views.BorrowedAPIView.as_view(), name='borrower'),
    path("borrower/create", views.add_borrower, name="borrower_create"),
    #
    # # Update a task
    # re_path(r'^(?P<pk>\d+)/update/$', views.task_update, name='task_update'),
    #
    # # Delete a task
    # re_path(r'^(?P<pk>\d+)/delete/$', views.task_delete, name='task_delete'),
]
